export default function (ctx) {
    //离开页面 刷新前 将store中的数据存到localStorage
    window.addEventListener('beforeunload', () => {
        // alert('页面刷新', ctx.store.state)
        // console.log('window.addEventListener-beforeunload');
        // localStorage.setItem("middleTitle", ctx.store.getters.middleTitle)
        // localStorage.setItem("pageTitle", ctx.store.getters.pageTitle)
    });
    //页面加载完成  将localStorage中的store数据
    window.addEventListener('load', () => {
        // console.log('window.addEventListener-load', ctx.store.state);
        // ctx.store.commit('setMiddleTitle', localStorage.getItem("middleTitle"))
        // ctx.store.commit('setPageTitle', localStorage.getItem("pageTitle"))

    });
}
